import request from '@/utils/request'

// 查询用户列表
export function getPageList(query) {
  return request({
    url: '/employee/getPageList',
    method: 'get',
    params: query
  })
}

/**
 * 查询省市县下拉数据
 * @param {Object} params
 */
export function getProvinceCitySelectItems(query) {
  return request({
    url: '/employee/getProvinceCitySelectItems',
    method: 'get',
    params: query
  })
}
/**
 * 查询用户信息
 * @param {Object} query
 */
export function getDetail(query) {
  return request({
    url: '/employee/getDetail',
    method: 'get',
    params:query
  })
}
/**
 * 查询用户员工档案详情信息
 * @param {Object} query
 */
export function getEmployeeArchives(query) {
  return request({
    url: '/employee/getEmployeeArchives',
    method: 'get',
    params: query
  })
}

// 新增用户
export function add(data) {
  return request({
    url: '/employee/add',
    method: 'post',
    data: data
  })
}

// 修改用户
export function edit(data) {
  return request({
    url: '/employee/edit',
    method: 'put',
    data: data
  })
}

// 删除用户
export function del(ids) {
  return request({
    url: '/employee/del/',
    method: 'delete',
    data:ids
  })
}

/**
 * 查询用户下拉数据
 * @param {Object} query
 */
export function getEmployeeSelectItems(query) {
  return request({
    url: '/employee/getEmployeeSelectItems/'+query,
    method: 'get'
  })
}

/**
 * 查询用户下拉数据
 * @param {Object} query
 */
export function addOtherFile(data) {
  return request({
    url: '/employee/addOtherFile',
    method: 'post',
    data:data
  })
}

/**
 * 查询用户下拉数据
 * @param {Object} query
 */
export function getHoldPostPageList(query) {
  return request({
    url: '/employee/getHoldPostPageList',
    method: 'get',
    params:query
  })
}
